﻿//	Plazes-ASPI is an AS2.0 abstraction of the Plazes (http://www.plazes.com) XMLRPC-API
//		Copyright (C) 2006	Florian Mlodzik
//
//		This library is free software; you can redistribute it and/or
//		modify it under the terms of the GNU Lesser General Public
//		License as published by the Free Software Foundation; either
//		version 2.1 of the License, or (at your option) any later version.
//
//		This library is distributed in the hope that it will be useful,
//		but WITHOUT ANY WARRANTY; without even the implied warranty of
//		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the GNU
//		Lesser General Public License for more details.
//
//		You should have received a copy of the GNU Lesser General Public
//		License along with this library; if not, write to the Free Software
//		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

// svn:keywords
// $URL: http://plazes-aspi.googlecode.com/svn/trunk/src/as2/com/orthogeneric/net/xmlrpc/events/XmlRpcProgress.as $
// $Id: XmlRpcProgress.as 4 2006-07-29 09:33:20Z florian.mlodzik $

/**
* A XmlRpcProgress-event will be repeatedly dispatched by a XmlRpc-instance during the download of a RPC response.		
* 
* @author florian.mlodzik@gmail.com
* @version 1.0
*/

// --> import
import com.orthogeneric.net.xmlrpc.XmlRpc;
// <-- import

class com.orthogeneric.net.xmlrpc.events.XmlRpcProgress
{
	/** The type of this event, always being "onXmlRpcProgress" */
	public var type:String = "onXmlRpcProgress";
	/** The target of this event referencing a {@code XmlRpc}-instance */
	public var target:XmlRpc;
	/** The number of loaded bytes from the RPC response */
	public var bytesLoaded:Number;
	/** The number of total bytes from the RPC response */
	public var bytesTotal:Number;
	/** The percentage of the download progress */
	public var percentage:Number;
	/** The name of the remote method called */
	public var remoteMethod:String;
	
	/**
	* The XmlRpcProgress-class constructor.
	* 
	* @param t The XmlRpc-instance that invoked the remote procedure call
	* @param bL The number of bytes loaded 
	* @param bT The number of bytes total
	* @param pctg The percentage of total progress
	* @param method The name of the remote method called 
	* 
	* @see com.orthogeneric.net.xmlrpc.XmlRpc#_onLoad()
	* 
	* @exclude 
	*/
	public function XmlRpcProgress(t:XmlRpc, bL:Number, bT:Number, pctg:Number, m:String)
	{
		target = t;
		bytesLoaded = bL;
		bytesTotal = bT;
		percentage = pctg;
		remoteMethod = m;
	}
}
